package com.java.system.common.constant;

/**
 * Created by ace on 2017/8/29.
 */
public class CommonConstants {
    public final static String RESOURCE_TYPE_MENU = "menu";
    public final static String RESOURCE_TYPE_BTN = "button";
    // 用户token异常
    public static final Integer EX_USER_INVALID_CODE = 40101;
    public static final Integer EX_USER_PASS_INVALID_CODE = 40001;
    public static final String EX_USER_PASS_INVALID = "login_error";
    // 客户端token异常
    public static final Integer EX_CLIENT_INVALID_CODE = 40301;
    public static final Integer EX_CLIENT_FORBIDDEN_CODE = 40331;
    public static final Integer EX_OTHER_CODE = 500;
    public static final String CONTEXT_KEY_USER_ID = "currentUserId";
    public static final String CONTEXT_KEY_USERNAME = "currentUserName";
    public static final String CONTEXT_KEY_USER_NAME = "currentUser";
    public static final String CONTEXT_KEY_USER_TYPE = "currentUserType";
    public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken";
    public static final String CONTEXT_KEY_COID = "currentCoId";//当前公司
    public static final String JWT_KEY_USER_ID = "userId";
    public static final String JWT_KEY_NAME = "name";
    /*************数据库字段*************/
    //数据库常用字段
    public static final int DELFLAG_TRUE = 1;
    public static final int DELFLAG_FALSE = 0;
    public static final String SYSRESOURCE_MENUTYPE_URI = "uri";
    public static final String SYSRESOURCE_MENUTYPE_MENU = "menu";
    public static final String SYSRESOURCE_MENUTYPE_API = "api";
    public static final String SYSRESOURCE_MENUTYPE_BTN = "btn";
    public static final String SYSROLE_ROLETYPE_GLOBAL = "global";
    public static final String PRIMARY_KEY = "id";
    /*************异常编号*************/
    //校验名称重复异常
    public static final Integer EX_NAME_EXIST_CODE = -1;
    //校验角色权限异常
    public static final Integer EX_PERMISSION_CODE = -2;

    public static final String VALIDATED_EXCODE = "500";

}
